<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .cont {
            position: relative;
            margin: 0 auto;
            width: 100px;
            height: 100px;
            background: rgb(146, 199, 146);
        }

        .parent {
            position: absolute;
            top: 100px;
            width: 100px;
            height: 100px;
            background: pink;
        }

        .hover {
            position: absolute;
            top: 100px;
            left: 0;
            width: 100px;
            height: 100px;
            background: #ccc;
            display: none;
        }
    </style>
</head>

<body>
    <div class="cont">
        <div class="parent">
            <div class="hover"></div>
        </div>
    </div>
    <script type="text/javascript" src="jquery.js"></script>
    <script>
        /* $(".parent").hover(function () {
                    $(".hover").css("display", "block");
                    console.log("1")
                }, function () {
                    $(".hover").css("display", "none");
                    console.log("2")

                }); */

        /* $(".parent").mouseenter(function () {
            $(".hover").css("display", "block");
            console.log("1")
        });
        $(".parent").mouseleave(function () {
            $(".hover").css("display", "none");
            console.log("2")
        }); */

        $(".parent").mouseover(function () {
            $(".hover").css("display", "block");
            console.log("1")
        });
        $(".parent").mouseout(function () {
            $(".hover").css("display", "none");
            console.log("2")
        });
    </script>
</body>

</html>